<?php
/**
 * 
 * @author nhan
 *
 */
class Model_Category {
	private $id;
	private $name;
	private $viewTimes;
	private $imageFile;
	private $orderIndex;
	private $enable;

	public function __construct($data) {
		if (is_array($data)) {
			if (isset($data['ID'])) {
				$this->id = $data['ID'];
			}
			
			if (isset($data['NAME'])) {
				$this->name = $data['NAME'];
			}
			
			if (isset($data['VIEW_TIMES'])) {
				$this->viewTimes = $data['VIEW_TIMES'];
			}
			
			if (isset($data['IMAGE_FILE'])) {
				$this->imageFile = $data['IMAGE_FILE'];
			}
			
			if (isset($data['ORDER_INDEX'])) {
				$this->orderIndex = $data['ORDER_INDEX'];
			}
			
			if (isset($data['ENABLE'])) {
				$this->enable = $data['ENABLE'];
			}
		}
	}

	public function getId() {
		return $this->id;
	}

	public function getName() {
		return $this->name;
	}

	public function getViewTimes() {
		return $this->viewTimes;
	}

	public function getImageFile() {
		return $this->imageFile;
	}

	public function getOrderIndex() {
		return $this->orderIndex;
	}

	public function getEnable() {
		return $this->enable;
	}

	public function setId($x) {
		$this->id = $x;
	}

	public function setName($x) {
		$this->name = $x;
	}

	public function setViewTimes($x) {
		$this->viewTimes = $x;
	}

	public function setImageFile($x) {
		$this->imageFile = $x;
	}

	public function setOrderIndex($x) {
		$this->orderIndex = $x;
	}

	public function setEnable($x) {
		$this->enable = $x;
	}

}